//
//  NSObject+XMLDicToArray.m
//  ContinueEDUPhone
//
//  Created by SL on 13-12-5.
//  Copyright (c) 2013年 Sheng Long. All rights reserved.
//

#import "NSObject+XMLDicToArray.h"

@implementation NSObject (XMLDicToArray)

//XML转字典时，只有一个对象的数组会存为字典格式，需转换成数组
-(NSArray*)XMLDicToArray;
{
    if ([self isKindOfClass:[NSArray class]]) {
        return (NSArray*)self;
    }else if ([self isKindOfClass:[NSDictionary class]]){
        NSMutableArray *array = [NSMutableArray arrayWithCapacity:1];
        [array addObject:self];
        return  array;
    }
    return nil;
}

@end
